
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gdata.Crypto.PublicKey.qNEW</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="gdata.html"><font color="#ffffff">gdata</font></a>.<a href="gdata.Crypto.html"><font color="#ffffff">Crypto</font></a>.<a href="gdata.Crypto.PublicKey.html"><font color="#ffffff">PublicKey</font></a>.qNEW</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/Crypto/PublicKey/qNEW.py">/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/Crypto/PublicKey/qNEW.py</a></font></td></tr></table>
    <p><tt>#&nbsp;&nbsp;&nbsp;qNEW.py&nbsp;:&nbsp;The&nbsp;q-NEW&nbsp;signature&nbsp;algorithm.<br>
#<br>
#&nbsp;&nbsp;Part&nbsp;of&nbsp;the&nbsp;Python&nbsp;Cryptography&nbsp;Toolkit<br>
#<br>
#&nbsp;Distribute&nbsp;and&nbsp;use&nbsp;freely;&nbsp;there&nbsp;are&nbsp;no&nbsp;restrictions&nbsp;on&nbsp;further<br>
#&nbsp;dissemination&nbsp;and&nbsp;usage&nbsp;except&nbsp;those&nbsp;imposed&nbsp;by&nbsp;the&nbsp;laws&nbsp;of&nbsp;your<br>
#&nbsp;country&nbsp;of&nbsp;residence.&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;software&nbsp;is&nbsp;provided&nbsp;"as&nbsp;is"&nbsp;without<br>
#&nbsp;warranty&nbsp;of&nbsp;fitness&nbsp;for&nbsp;use&nbsp;or&nbsp;suitability&nbsp;for&nbsp;any&nbsp;purpose,&nbsp;express<br>
#&nbsp;or&nbsp;implied.&nbsp;Use&nbsp;at&nbsp;your&nbsp;own&nbsp;risk&nbsp;or&nbsp;not&nbsp;at&nbsp;all.<br>
#</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Crypto.Hash.SHA.html">Crypto.Hash.SHA</a><br>
<a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="Crypto.PublicKey.pubkey.html">Crypto.PublicKey.pubkey</a><br>
<a href="struct.html">struct</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="warnings.html">warnings</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="Crypto.PublicKey.pubkey.html#pubkey">Crypto.PublicKey.pubkey.pubkey</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gdata.Crypto.PublicKey.qNEW.html#qNEWobj">qNEWobj</a>
</font></dt><dt><font face="helvetica, arial"><a href="gdata.Crypto.PublicKey.qNEW.html#qNEWobj">qNEWobj</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gdata.Crypto.PublicKey.qNEW.html#error">error</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="error">class <strong>error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gdata.Crypto.PublicKey.qNEW.html#error">error</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;help(type(x))&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><strong>object</strong> = <a name="object">class qNEWobj</a>(<a href="Crypto.PublicKey.pubkey.html#pubkey">Crypto.PublicKey.pubkey.pubkey</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="qNEWobj-can_encrypt"><strong>can_encrypt</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;Boolean&nbsp;value&nbsp;recording&nbsp;whether&nbsp;this&nbsp;algorithm&nbsp;can&nbsp;encrypt&nbsp;data.</tt></dd></dl>

<dl><dt><a name="qNEWobj-can_sign"><strong>can_sign</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;Boolean&nbsp;value&nbsp;recording&nbsp;whether&nbsp;this&nbsp;algorithm&nbsp;can&nbsp;generate&nbsp;signatures.</tt></dd></dl>

<dl><dt><a name="qNEWobj-has_private"><strong>has_private</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;Boolean&nbsp;denoting&nbsp;whether&nbsp;the&nbsp;<a href="#object">object</a>&nbsp;contains<br>
private&nbsp;components.</tt></dd></dl>

<dl><dt><a name="qNEWobj-publickey"><strong>publickey</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;new&nbsp;key&nbsp;<a href="#object">object</a>&nbsp;containing&nbsp;only&nbsp;the&nbsp;public&nbsp;information.</tt></dd></dl>

<dl><dt><a name="qNEWobj-size"><strong>size</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;maximum&nbsp;number&nbsp;of&nbsp;bits&nbsp;that&nbsp;can&nbsp;be&nbsp;handled&nbsp;by&nbsp;this&nbsp;key.</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>keydata</strong> = ['p', 'q', 'g', 'y', 'x']</dl>

<hr>
Methods inherited from <a href="Crypto.PublicKey.pubkey.html#pubkey">Crypto.PublicKey.pubkey.pubkey</a>:<br>
<dl><dt><a name="qNEWobj-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt><a href="#object-__eq__">__eq__</a>(other):&nbsp;0,&nbsp;1<br>
Compare&nbsp;us&nbsp;to&nbsp;other&nbsp;for&nbsp;equality.</tt></dd></dl>

<dl><dt><a name="qNEWobj-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>To&nbsp;keep&nbsp;key&nbsp;objects&nbsp;platform-independent,&nbsp;the&nbsp;key&nbsp;data&nbsp;is<br>
converted&nbsp;to&nbsp;standard&nbsp;Python&nbsp;long&nbsp;integers&nbsp;before&nbsp;being<br>
written&nbsp;out.&nbsp;&nbsp;It&nbsp;will&nbsp;then&nbsp;be&nbsp;reconverted&nbsp;as&nbsp;necessary&nbsp;on<br>
restoration.</tt></dd></dl>

<dl><dt><a name="qNEWobj-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="qNEWobj-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt><a href="#object-__ne__">__ne__</a>(other):&nbsp;0,&nbsp;1<br>
Compare&nbsp;us&nbsp;to&nbsp;other&nbsp;for&nbsp;inequality.</tt></dd></dl>

<dl><dt><a name="qNEWobj-__setstate__"><strong>__setstate__</strong></a>(self, d)</dt><dd><tt>On&nbsp;unpickling&nbsp;a&nbsp;key&nbsp;<a href="#object">object</a>,&nbsp;the&nbsp;key&nbsp;data&nbsp;is&nbsp;converted&nbsp;to&nbsp;the&nbsp;big<br>
number&nbsp;representation&nbsp;being&nbsp;used,&nbsp;whether&nbsp;that&nbsp;is&nbsp;Python&nbsp;long<br>
integers,&nbsp;MPZ&nbsp;objects,&nbsp;or&nbsp;whatever.</tt></dd></dl>

<dl><dt><a name="qNEWobj-blind"><strong>blind</strong></a>(self, M, B)</dt><dd><tt><a href="#object-blind">blind</a>(M&nbsp;:&nbsp;string|long,&nbsp;B&nbsp;:&nbsp;string|long)&nbsp;:&nbsp;string|long<br>
Blind&nbsp;message&nbsp;M&nbsp;using&nbsp;blinding&nbsp;factor&nbsp;B.</tt></dd></dl>

<dl><dt><a name="qNEWobj-can_blind"><strong>can_blind</strong></a>(self)</dt><dd><tt><a href="#object-can_blind">can_blind</a>()&nbsp;:&nbsp;bool<br>
Return&nbsp;a&nbsp;Boolean&nbsp;value&nbsp;recording&nbsp;whether&nbsp;this&nbsp;algorithm&nbsp;can<br>
blind&nbsp;data.&nbsp;&nbsp;(This&nbsp;does&nbsp;not&nbsp;imply&nbsp;that&nbsp;this<br>
particular&nbsp;key&nbsp;<a href="#object">object</a>&nbsp;has&nbsp;the&nbsp;private&nbsp;information&nbsp;required&nbsp;to<br>
to&nbsp;blind&nbsp;a&nbsp;message.)</tt></dd></dl>

<dl><dt><a name="qNEWobj-decrypt"><strong>decrypt</strong></a>(self, ciphertext)</dt><dd><tt><a href="#object-decrypt">decrypt</a>(ciphertext:tuple|string|long):&nbsp;string<br>
Decrypt&nbsp;'ciphertext'&nbsp;using&nbsp;this&nbsp;key.</tt></dd></dl>

<dl><dt><a name="qNEWobj-encrypt"><strong>encrypt</strong></a>(self, plaintext, K)</dt><dd><tt><a href="#object-encrypt">encrypt</a>(plaintext:string|long,&nbsp;K:string|long)&nbsp;:&nbsp;tuple<br>
Encrypt&nbsp;the&nbsp;string&nbsp;or&nbsp;integer&nbsp;plaintext.&nbsp;&nbsp;K&nbsp;is&nbsp;a&nbsp;random<br>
parameter&nbsp;required&nbsp;by&nbsp;some&nbsp;algorithms.</tt></dd></dl>

<dl><dt><a name="qNEWobj-sign"><strong>sign</strong></a>(self, M, K)</dt><dd><tt><a href="#object-sign">sign</a>(M&nbsp;:&nbsp;string|long,&nbsp;K:string|long)&nbsp;:&nbsp;tuple<br>
Return&nbsp;a&nbsp;tuple&nbsp;containing&nbsp;the&nbsp;signature&nbsp;for&nbsp;the&nbsp;message&nbsp;M.<br>
K&nbsp;is&nbsp;a&nbsp;random&nbsp;parameter&nbsp;required&nbsp;by&nbsp;some&nbsp;algorithms.</tt></dd></dl>

<dl><dt><a name="qNEWobj-unblind"><strong>unblind</strong></a>(self, M, B)</dt><dd><tt><a href="#object-unblind">unblind</a>(M&nbsp;:&nbsp;string|long,&nbsp;B&nbsp;:&nbsp;string|long)&nbsp;:&nbsp;string|long<br>
Unblind&nbsp;message&nbsp;M&nbsp;using&nbsp;blinding&nbsp;factor&nbsp;B.</tt></dd></dl>

<dl><dt><a name="qNEWobj-validate"><strong>validate</strong></a>(self, M, signature)</dt><dd><tt>#&nbsp;alias&nbsp;to&nbsp;compensate&nbsp;for&nbsp;the&nbsp;old&nbsp;<a href="#object-validate">validate</a>()&nbsp;name</tt></dd></dl>

<dl><dt><a name="qNEWobj-verify"><strong>verify</strong></a>(self, M, signature)</dt><dd><tt><a href="#object-verify">verify</a>(M:string|long,&nbsp;signature:tuple)&nbsp;:&nbsp;bool<br>
Verify&nbsp;that&nbsp;the&nbsp;signature&nbsp;is&nbsp;valid&nbsp;for&nbsp;the&nbsp;message&nbsp;M;<br>
returns&nbsp;true&nbsp;if&nbsp;the&nbsp;signature&nbsp;checks&nbsp;out.</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="qNEWobj">class <strong>qNEWobj</strong></a>(<a href="Crypto.PublicKey.pubkey.html#pubkey">Crypto.PublicKey.pubkey.pubkey</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="qNEWobj-can_encrypt"><strong>can_encrypt</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;Boolean&nbsp;value&nbsp;recording&nbsp;whether&nbsp;this&nbsp;algorithm&nbsp;can&nbsp;encrypt&nbsp;data.</tt></dd></dl>

<dl><dt><a name="qNEWobj-can_sign"><strong>can_sign</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;Boolean&nbsp;value&nbsp;recording&nbsp;whether&nbsp;this&nbsp;algorithm&nbsp;can&nbsp;generate&nbsp;signatures.</tt></dd></dl>

<dl><dt><a name="qNEWobj-has_private"><strong>has_private</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;Boolean&nbsp;denoting&nbsp;whether&nbsp;the&nbsp;<a href="#object">object</a>&nbsp;contains<br>
private&nbsp;components.</tt></dd></dl>

<dl><dt><a name="qNEWobj-publickey"><strong>publickey</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;new&nbsp;key&nbsp;<a href="#object">object</a>&nbsp;containing&nbsp;only&nbsp;the&nbsp;public&nbsp;information.</tt></dd></dl>

<dl><dt><a name="qNEWobj-size"><strong>size</strong></a>(self)</dt><dd><tt>Return&nbsp;the&nbsp;maximum&nbsp;number&nbsp;of&nbsp;bits&nbsp;that&nbsp;can&nbsp;be&nbsp;handled&nbsp;by&nbsp;this&nbsp;key.</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>keydata</strong> = ['p', 'q', 'g', 'y', 'x']</dl>

<hr>
Methods inherited from <a href="Crypto.PublicKey.pubkey.html#pubkey">Crypto.PublicKey.pubkey.pubkey</a>:<br>
<dl><dt><a name="qNEWobj-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt><a href="#qNEWobj-__eq__">__eq__</a>(other):&nbsp;0,&nbsp;1<br>
Compare&nbsp;us&nbsp;to&nbsp;other&nbsp;for&nbsp;equality.</tt></dd></dl>

<dl><dt><a name="qNEWobj-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>To&nbsp;keep&nbsp;key&nbsp;objects&nbsp;platform-independent,&nbsp;the&nbsp;key&nbsp;data&nbsp;is<br>
converted&nbsp;to&nbsp;standard&nbsp;Python&nbsp;long&nbsp;integers&nbsp;before&nbsp;being<br>
written&nbsp;out.&nbsp;&nbsp;It&nbsp;will&nbsp;then&nbsp;be&nbsp;reconverted&nbsp;as&nbsp;necessary&nbsp;on<br>
restoration.</tt></dd></dl>

<dl><dt><a name="qNEWobj-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="qNEWobj-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt><a href="#qNEWobj-__ne__">__ne__</a>(other):&nbsp;0,&nbsp;1<br>
Compare&nbsp;us&nbsp;to&nbsp;other&nbsp;for&nbsp;inequality.</tt></dd></dl>

<dl><dt><a name="qNEWobj-__setstate__"><strong>__setstate__</strong></a>(self, d)</dt><dd><tt>On&nbsp;unpickling&nbsp;a&nbsp;key&nbsp;<a href="#object">object</a>,&nbsp;the&nbsp;key&nbsp;data&nbsp;is&nbsp;converted&nbsp;to&nbsp;the&nbsp;big<br>
number&nbsp;representation&nbsp;being&nbsp;used,&nbsp;whether&nbsp;that&nbsp;is&nbsp;Python&nbsp;long<br>
integers,&nbsp;MPZ&nbsp;objects,&nbsp;or&nbsp;whatever.</tt></dd></dl>

<dl><dt><a name="qNEWobj-blind"><strong>blind</strong></a>(self, M, B)</dt><dd><tt><a href="#qNEWobj-blind">blind</a>(M&nbsp;:&nbsp;string|long,&nbsp;B&nbsp;:&nbsp;string|long)&nbsp;:&nbsp;string|long<br>
Blind&nbsp;message&nbsp;M&nbsp;using&nbsp;blinding&nbsp;factor&nbsp;B.</tt></dd></dl>

<dl><dt><a name="qNEWobj-can_blind"><strong>can_blind</strong></a>(self)</dt><dd><tt><a href="#qNEWobj-can_blind">can_blind</a>()&nbsp;:&nbsp;bool<br>
Return&nbsp;a&nbsp;Boolean&nbsp;value&nbsp;recording&nbsp;whether&nbsp;this&nbsp;algorithm&nbsp;can<br>
blind&nbsp;data.&nbsp;&nbsp;(This&nbsp;does&nbsp;not&nbsp;imply&nbsp;that&nbsp;this<br>
particular&nbsp;key&nbsp;<a href="#object">object</a>&nbsp;has&nbsp;the&nbsp;private&nbsp;information&nbsp;required&nbsp;to<br>
to&nbsp;blind&nbsp;a&nbsp;message.)</tt></dd></dl>

<dl><dt><a name="qNEWobj-decrypt"><strong>decrypt</strong></a>(self, ciphertext)</dt><dd><tt><a href="#qNEWobj-decrypt">decrypt</a>(ciphertext:tuple|string|long):&nbsp;string<br>
Decrypt&nbsp;'ciphertext'&nbsp;using&nbsp;this&nbsp;key.</tt></dd></dl>

<dl><dt><a name="qNEWobj-encrypt"><strong>encrypt</strong></a>(self, plaintext, K)</dt><dd><tt><a href="#qNEWobj-encrypt">encrypt</a>(plaintext:string|long,&nbsp;K:string|long)&nbsp;:&nbsp;tuple<br>
Encrypt&nbsp;the&nbsp;string&nbsp;or&nbsp;integer&nbsp;plaintext.&nbsp;&nbsp;K&nbsp;is&nbsp;a&nbsp;random<br>
parameter&nbsp;required&nbsp;by&nbsp;some&nbsp;algorithms.</tt></dd></dl>

<dl><dt><a name="qNEWobj-sign"><strong>sign</strong></a>(self, M, K)</dt><dd><tt><a href="#qNEWobj-sign">sign</a>(M&nbsp;:&nbsp;string|long,&nbsp;K:string|long)&nbsp;:&nbsp;tuple<br>
Return&nbsp;a&nbsp;tuple&nbsp;containing&nbsp;the&nbsp;signature&nbsp;for&nbsp;the&nbsp;message&nbsp;M.<br>
K&nbsp;is&nbsp;a&nbsp;random&nbsp;parameter&nbsp;required&nbsp;by&nbsp;some&nbsp;algorithms.</tt></dd></dl>

<dl><dt><a name="qNEWobj-unblind"><strong>unblind</strong></a>(self, M, B)</dt><dd><tt><a href="#qNEWobj-unblind">unblind</a>(M&nbsp;:&nbsp;string|long,&nbsp;B&nbsp;:&nbsp;string|long)&nbsp;:&nbsp;string|long<br>
Unblind&nbsp;message&nbsp;M&nbsp;using&nbsp;blinding&nbsp;factor&nbsp;B.</tt></dd></dl>

<dl><dt><a name="qNEWobj-validate"><strong>validate</strong></a>(self, M, signature)</dt><dd><tt>#&nbsp;alias&nbsp;to&nbsp;compensate&nbsp;for&nbsp;the&nbsp;old&nbsp;<a href="#qNEWobj-validate">validate</a>()&nbsp;name</tt></dd></dl>

<dl><dt><a name="qNEWobj-verify"><strong>verify</strong></a>(self, M, signature)</dt><dd><tt><a href="#qNEWobj-verify">verify</a>(M:string|long,&nbsp;signature:tuple)&nbsp;:&nbsp;bool<br>
Verify&nbsp;that&nbsp;the&nbsp;signature&nbsp;is&nbsp;valid&nbsp;for&nbsp;the&nbsp;message&nbsp;M;<br>
returns&nbsp;true&nbsp;if&nbsp;the&nbsp;signature&nbsp;checks&nbsp;out.</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-construct"><strong>construct</strong></a>(tuple)</dt><dd><tt><a href="#-construct">construct</a>(tuple:(long,long,long,long)|(long,long,long,long,long)<br>
Construct&nbsp;a&nbsp;qNEW&nbsp;<a href="#object">object</a>&nbsp;from&nbsp;a&nbsp;4-&nbsp;or&nbsp;5-tuple&nbsp;of&nbsp;numbers.</tt></dd></dl>
 <dl><dt><a name="-generate"><strong>generate</strong></a>(bits, randfunc, progress_func<font color="#909090">=None</font>)</dt><dd><tt><a href="#-generate">generate</a>(bits:int,&nbsp;randfunc:callable,&nbsp;progress_func:callable)<br>
&nbsp;<br>
Generate&nbsp;a&nbsp;qNEW&nbsp;key&nbsp;of&nbsp;length&nbsp;'bits',&nbsp;using&nbsp;'randfunc'&nbsp;to&nbsp;get<br>
random&nbsp;data&nbsp;and&nbsp;'progress_func',&nbsp;if&nbsp;present,&nbsp;to&nbsp;display<br>
the&nbsp;progress&nbsp;of&nbsp;the&nbsp;key&nbsp;generation.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>HASHBITS</strong> = 160<br>
<strong>__revision__</strong> = '$Id: qNEW.py,v 1.8 2003/04/04 15:13:35 akuchling Exp $'<br>
<strong>sieve_base</strong> = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, ...)</td></tr></table>
</body></html>